const Layout = () => import('@/components/Layout')

/*
// default
meta: {
  title: '', //
  keepAlive: false,
  tabbar: flase, // bottom navigation of page -- Design do not have bar
  navbar: true // top navigation of page
  permission // must need  if true, api must need token
}

*/

export default [
  { // 首页
    path: '/',
    component: Layout,
    redirect: '/user/my',
    meta: { title: 'home', icon: 'star' },
    menu: false,
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import(/* webpackChunkName: "home" */ '@/views/home/index'),
        meta: { title: 'home', navbar: false, tabbar: true, permission: true, keepAlive: false }
      }
    ]
  },
  { // 用户模块
    path: '/user/my',
    component: Layout,
    meta: { title: 'user', icon: 'manager' },
    menu: true,
    children: [
      {
        path: '/user/my',
        name: 'My',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/my/index'),
        meta: { title: 'user', navbar: false, tabbar: true, permission: true, keepAlive: false }
      }
    ]
  },
  { // 生日模块
    path: '/birthday',
    component: Layout,
    meta: { title: 'birthday', icon: 'manager' },
    menu: false,
    children: [
      { // 祝福回忆模块
        path: '/birthday/memoryList',
        name: 'MemoryList',
        component: () => import(/* webpackChunkName: "memoryList" */ '@/views/birthday/memoryList/index'),
        meta: { title: 'memoryList', navbar: true, tabbar: false, permission: true, keepAlive: false }
      },
      { // 发送的祝福列表
        path: '/birthday/blessList',
        name: 'BlessList',
        component: () => import(/* webpackChunkName: "blessList" */ '@/views/birthday/blessList/index'),
        meta: { title: 'blessList', navbar: false, tabbar: false, permission: true, keepAlive: false }
      },
      { // 发送祝福
        path: '/birthday/blessSend',
        name: 'BlessSend',
        component: () => import(/* webpackChunkName: "blessSend" */ '@/views/birthday/blessSend/index'),
        meta: { title: 'blessSend', navbar: false, tabbar: false, permission: true, keepAlive: false }
      },
      { // 祝福海报
        path: '/birthday/poster',
        name: 'BirthdayPoster',
        component: () => import(/* webpackChunkName: "birthdayPoster" */ '@/views/birthday/poster/index'),
        meta: { title: 'poster', navbar: false, tabbar: false, permission: true, keepAlive: false }
      },
      { // 祝福海报
        path: '/birthday/send/success',
        name: 'BirthdaySendSuccess',
        component: () => import(/* webpackChunkName: "birthdaySendSuccess" */ '@/views/birthday/blessSend/success'),
        meta: { title: 'sendSuccess', navbar: false, tabbar: false, permission: true, keepAlive: false }
      }
    ]
  },
  { // 周年模块
    path: '/anniversary',
    component: Layout,
    meta: { title: 'anniversary', icon: 'manager' },
    menu: false,
    children: [
      { // 祝福海报
        path: '/anniversary/poster',
        name: 'AnniversaryPoster',
        component: () => import(/* webpackChunkName: "anniversaryPoster" */ '@/views/anniversary/poster/index'),
        meta: { title: 'poster', navbar: false, tabbar: false, permission: true, keepAlive: false }
      }
    ]
  },
  {
    path: '/pc',
    name: 'PC',
    component: () => import(/* webpackChunkName: "pc" */ '@/views/pc/index.vue'),
    meta: { title: 'pc', permission: true }
  }
]
